<template>
  <div class="m-life">
    <el-row>
      <el-col :span="18">
        <slider/>
      </el-col>

      <el-col :span="6">
        <div class="m-life-login">
          <h4><img
            src="//s0.meituan.net/bs/fe-web-meituan/2d05c2b/img/avatar.jpg"
            alt=""></h4>
          <p class="m-life-login-name">Hi！你好</p>
          <p>
            <nuxt-link to="/register">
              <el-button
                round
                size="medium">注册
              </el-button>
            </nuxt-link>
          </p>
          <p>
            <nuxt-link to="/login">
              <el-button
                round
                size="medium">立即登录
              </el-button>
            </nuxt-link>
          </p>
        </div>
      </el-col>
    </el-row>
    <el-row class="hot-good" :gutter="5">

      <el-col :span="6" v-for="(img,idx) in srcs" v-bind:key="idx">

        <el-image :src="img"></el-image>

      </el-col>

      <el-col :span="6">
        <div class="m-life-downapp">
          <img
            :src="code_logo"
            alt="小程序">
          <h4><span class="red">微信</span><em class="gary">扫一扫</em></h4>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import Slider from './slider.vue'

export default {
  components: {
    Slider
  },
  data() {
    return {
      code_logo: "//s1.meituan.net/bs/fe-web-meituan/60ac9a0/img/download-qr.png",
      srcs: [
        "https://www.petpochitto.com/uploads/site/bnr_senior01.jpg",
        "https://www.petpochitto.com/uploads/site/bnr_insyoku01.jpg",
        "https://www.petpochitto.com/uploads/site/bnr_clinic01.jpg"
      ]
    }
  }
}
</script>


<style lang="scss" scoped>
.m-life {
  .m-life-pic {
    margin: 10px 10px 10px 0;
    width: 150px;
    height: 240px;
    background: url(//p0.meituan.net/codeman/e473bb428f070321269b23370ff02ba956209.jpg);
    background-size: 150px;
  }

  .m-life-login {
    margin: -5px 0 10px 0;
    box-sizing: border-box;
    height: 247px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;

    .m-life-login-name {
      margin-bottom: 10px;
    }

    button {
      width: 118px;
      margin: 5px;
    }

    h4 {
      img {
        width: 47px;
        height: 47px;
        border-radius: 50%;
        border: 4px solid #E5E5E5;
      }
    }

    p > button {
      width: 120px;
      margin-bottom: 15px;
    }
  }

  .hot-good {
    > .el-col:nth-child(1){
      margin-left: 10px;
    }
    > .el-col:nth-child(3){
      margin-right: 5px;
    }
    .el-col{
      width: 233px;
    }

    .el-image {
      //width: auto;
      height: 165px;
    }


  }

  .m-life-downapp {
    background: #fff;
    height: 165px;
    text-align: center;

    img {
      width: 95px;
      height: 95px;
      margin-top: 20px;
    }

    p {
      font-size: 16px;
      color: #222;
      font-weight: 500;
    }

    h4 {
      font-size: 12px;
      font-weight: 500;
      margin-top: 2px;

      span {
        color: #EC5330;
        margin-right: 5px;
      }

      em {
        color: #3f3f3f;
        font-style: normal;
      }
    }
  }

}
</style>
